<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JQuery AJAX</title>
</head>
<body>
    <input type="button" value="ajax">
    <script src="../js/jquery-1.12.4.min.js"></script>
    <script src="../js/mock-min.js"></script>
    <script src="../lesson13/data.js"></script>
    <script src="./ajax.js"></script>
    <script>
        $("[value=ajax]").click(async function(){
            // $.ajax({
            //     type:"post",
            //     url:"/findStudents",
            //     data:{
            //         type:"",value:""
            //     },
            //     success(res){
            //         console.log("res",res);
            //     }
            // });
            let res = await ajax({
                type:"post",
                url:"/findStudents",
                processData:false,
                
                data:{
                    type:"name",value:"马"
                }
            });
            console.log("res",res,typeof res);
        });
    </script>
</body>
</html>